next up previous
Next: 5.2 Synchronization Issues Up: 5 Other Issues Previous: 5 Other Issues

5.1 Overlays and Underlays

  
Figure 4: The difference between the drawable clip and visible clip of a window occluded by a window in the overlay planes.

OpenGL supports overlay and underlay planes. Overlays are frame buffer image planes that are displayed preferentially to the normal frame buffer image planes. A special transparent pixel value can be used to ``show through'' to the contents of the normal planes. Underlay planes are like overlays but are displayed deferentially to the normal planes. Overlays and underlays are useful for text annotation, rubber banding, transient menus, and animation effects. While a simple frame buffer has a single layer, graphics hardware supporting overlays and/or underlays can be thought of as having multiple, stacked frame buffer layers.

As mentioned previously, OpenGL treats windows in the overlay and underlay planes as first class windows in the X window hierarchy which is the convention for handling overlays in X [4]. IRIS GL had a simpler notion where frame buffer layers all existed in a single window spanning each frame buffer layer. Windows in non-normal layers are just like other windows excepting transparency effects and potentially fewer expose events being generated.

The most important insight into the support for frame buffer layers in a window system is that the drawable clip and the visible region of a window are no longer always identical. Figure 4 demonstrates this point.

SGI found that its older hardware which supported a single layer of integrated CIDs and DIDs made it impossible to support direct OpenGL rendering into the overlay planes. This old hardware is sufficient to implement IRIS GL's simpler model for layered frame buffers, but a single layer of DIDs combined with CIDs makes it impossible to perform CID clipping for overlay plane windows while keeping the display modes correct for the normal plane windows.

The current high-end SGI hardware supports separate DID information per frame layer to solve this problem (to support multiple display modes for the overlays). With separate CIDs and DIDs, the CID planes can generally be used for both overlay and normal planes clipping. Using CIDs for clipping does not change how the display modes are arranged. But using CIDs for both overlay and normal planes clipping could contribute to CID thrashing since the drawable region for an overlay window might overlap the drawable region of a normal plane window. Separate clipping planes for each frame buffer layer could remedy the problem, but CID thrashing due to sharing clipping planes between layers has not proven to be a problem in practice.



next up previous
Next: 5.2 Synchronization Issues Up: 5 Other Issues Previous: 5 Other Issues



mjk@sgi.com